Integrand size = 33, antiderivative size = 132 \[ \int \frac {(a+a \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=-\frac {2 a (5 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a (3 A+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a (5 A+3 C) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}} \]
[Out]
Time = 0.27 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {4199, 3111, 3100, 2827, 2716, 2719, 2720} \[ \int \frac {(a+a \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {2 a (3 A+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}-\frac {2 a (5 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a (5 A+3 C) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)} \]
[In]
[Out]
Rule 2716
Rule 2719
Rule 2720
Rule 2827
Rule 3100
Rule 3111
Rule 4199
Rubi steps \begin{align*} \text {integral}& = \int \frac {(a+a \cos (c+d x)) \left (C+A \cos ^2(c+d x)\right )}{\cos ^{\frac {7}{2}}(c+d x)} \, dx \\ & = \frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2}{5} \int \frac {\frac {5 a C}{2}+\frac {1}{2} a (5 A+3 C) \cos (c+d x)+\frac {5}{2} a A \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx \\ & = \frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {4}{15} \int \frac {\frac {3}{4} a (5 A+3 C)+\frac {5}{4} a (3 A+C) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x)} \, dx \\ & = \frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {1}{3} (a (3 A+C)) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx+\frac {1}{5} (a (5 A+3 C)) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx \\ & = \frac {2 a (3 A+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a (5 A+3 C) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}-\frac {1}{5} (a (5 A+3 C)) \int \sqrt {\cos (c+d x)} \, dx \\ & = -\frac {2 a (5 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 a (3 A+C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 a C \sin (c+d x)}{5 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 a C \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a (5 A+3 C) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 10.10 (sec) , antiderivative size = 851, normalized size of antiderivative = 6.45 \[ \int \frac {(a+a \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=a \left (\sqrt {\cos (c+d x)} (1+\cos (c+d x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (\frac {(5 A+3 C) \csc (c) \sec (c)}{5 d}+\frac {C \sec (c) \sec ^3(c+d x) \sin (d x)}{5 d}+\frac {\sec (c) \sec ^2(c+d x) (3 C \sin (c)+5 C \sin (d x))}{15 d}+\frac {\sec (c) \sec (c+d x) (5 C \sin (c)+15 A \sin (d x)+9 C \sin (d x))}{15 d}\right )-\frac {A (1+\cos (c+d x)) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\arctan (\cot (c)))\right ) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (d x-\arctan (\cot (c))) \sqrt {1-\sin (d x-\arctan (\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\arctan (\cot (c)))} \sqrt {1+\sin (d x-\arctan (\cot (c)))}}{d \sqrt {1+\cot ^2(c)}}-\frac {C (1+\cos (c+d x)) \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\arctan (\cot (c)))\right ) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec (d x-\arctan (\cot (c))) \sqrt {1-\sin (d x-\arctan (\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\arctan (\cot (c)))} \sqrt {1+\sin (d x-\arctan (\cot (c)))}}{3 d \sqrt {1+\cot ^2(c)}}+\frac {A (1+\cos (c+d x)) \csc (c) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\arctan (\tan (c)))\right ) \sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\arctan (\tan (c)))} \sqrt {1+\cos (d x+\arctan (\tan (c)))} \sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{2 d}+\frac {3 C (1+\cos (c+d x)) \csc (c) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2(d x+\arctan (\tan (c)))\right ) \sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1-\cos (d x+\arctan (\tan (c)))} \sqrt {1+\cos (d x+\arctan (\tan (c)))} \sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}} \sqrt {1+\tan ^2(c)}}-\frac {\frac {\sin (d x+\arctan (\tan (c))) \tan (c)}{\sqrt {1+\tan ^2(c)}}+\frac {2 \cos ^2(c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}{\cos ^2(c)+\sin ^2(c)}}{\sqrt {\cos (c) \cos (d x+\arctan (\tan (c))) \sqrt {1+\tan ^2(c)}}}\right )}{10 d}\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(701\) vs. \(2(168)=336\).
Time = 2.47 (sec) , antiderivative size = 702, normalized size of antiderivative = 5.32
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.11 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.67 \[ \int \frac {(a+a \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {-5 i \, \sqrt {2} {\left (3 \, A + C\right )} a \cos \left (d x + c\right )^{3} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 i \, \sqrt {2} {\left (3 \, A + C\right )} a \cos \left (d x + c\right )^{3} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 i \, \sqrt {2} {\left (5 \, A + 3 \, C\right )} a \cos \left (d x + c\right )^{3} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 i \, \sqrt {2} {\left (5 \, A + 3 \, C\right )} a \cos \left (d x + c\right )^{3} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (3 \, {\left (5 \, A + 3 \, C\right )} a \cos \left (d x + c\right )^{2} + 5 \, C a \cos \left (d x + c\right ) + 3 \, C a\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{15 \, d \cos \left (d x + c\right )^{3}} \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=a \left (\int \frac {A}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {A \sec {\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {C \sec ^{2}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx + \int \frac {C \sec ^{3}{\left (c + d x \right )}}{\sqrt {\cos {\left (c + d x \right )}}}\, dx\right ) \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+a \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Time = 18.60 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.14 \[ \int \frac {(a+a \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {2\,A\,a\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{d}+\frac {2\,A\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{d\,\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,C\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{3\,d\,{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}}+\frac {2\,C\,a\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{5\,d\,{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]
[In]
[Out]